package com.log.james.entity;

import java.util.Date;
import java.util.Objects;

public class Fwlog {
    private Long id;
    private Long internalip;
    private Date producetime;
    private String mathedstrategy;
    private String accessstrategy;
    private Long srcip;
    private int srcport;
    private Long destip;
    private int destport;
    private int protocol;
    private String address;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getInternalip() {
        return internalip;
    }

    public void setInternalip(Long internalip) {
        this.internalip = internalip;
    }

    public Date getProducetime() {
        return producetime;
    }

    public void setProducetime(Date producetime) {
        this.producetime = producetime;
    }

    public String getMathedstrategy() {
        return mathedstrategy;
    }

    public void setMathedstrategy(String mathedstrategy) {
        this.mathedstrategy = mathedstrategy;
    }

    public String getAccessstrategy() {
        return accessstrategy;
    }

    public void setAccessstrategy(String accessstrategy) {
        this.accessstrategy = accessstrategy;
    }

    public Long getSrcip() {
        return srcip;
    }

    public void setSrcip(Long srcip) {
        this.srcip = srcip;
    }

    public int getSrcport() {
        return srcport;
    }

    public void setSrcport(int srcport) {
        this.srcport = srcport;
    }

    public Long getDestip() {
        return destip;
    }

    public void setDestip(Long destip) {
        this.destip = destip;
    }

    public int getDestport() {
        return destport;
    }

    public void setDestport(int destport) {
        this.destport = destport;
    }

    public int getProtocol() {
        return protocol;
    }

    public void setProtocol(int protocol) {
        this.protocol = protocol;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Fwlog fwlog = (Fwlog) o;
        return srcport == fwlog.srcport &&
                destport == fwlog.destport &&
                protocol == fwlog.protocol &&
                Objects.equals(id, fwlog.id) &&
                Objects.equals(internalip, fwlog.internalip) &&
                Objects.equals(producetime, fwlog.producetime) &&
                Objects.equals(mathedstrategy, fwlog.mathedstrategy) &&
                Objects.equals(accessstrategy, fwlog.accessstrategy) &&
                Objects.equals(srcip, fwlog.srcip) &&
                Objects.equals(destip, fwlog.destip) &&
                Objects.equals(address, fwlog.address);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, internalip, producetime, mathedstrategy, accessstrategy, srcip, srcport, destip, destport, protocol, address);
    }

    @Override
    public String toString() {
        return "Fwlog{" +
                "id=" + id +
                ", internalip=" + internalip +
                ", producetime=" + producetime +
                ", mathedstrategy='" + mathedstrategy + '\'' +
                ", accessstrategy='" + accessstrategy + '\'' +
                ", srcip=" + srcip +
                ", srcport=" + srcport +
                ", destip=" + destip +
                ", destport=" + destport +
                ", protocol=" + protocol +
                ", address='" + address + '\'' +
                '}';
    }
}
